Ext.define('IHC.controller.ihc.cadastros.IHC002FormController' , {
	extend: 'Ext.app.Controller',
	
	requires: [
		'IHC.model.Equipe',
		'IHC.store.ihc.cadastros.IHC002Equipe',
		'IHC.view.ihc.cadastros.IHC002FormWindow'
	],
	
	views: [
		'IHC.view.ihc.cadastros.IHC002FormWindow'
	],
	
	stores: [
		'IHC.store.ihc.cadastros.IHC002Equipe'
	],
	
	refs: [{
		ref: 'hintToolbar',
		selector: '#ihc002-hint-toolbar'
	},{
		ref: 'windowRef',
		selector: '#ihc002-window'
	},{
		ref: 'formRef',
		selector: '#ihc002-form'
	}],
	
	mixins: [
		'InsoftExtUi.ux.mixins.controller.CrudFormMixin'
	],
	
	init: function() {
		var me = this;
		me.initController('IHC.store.ihc.cadastros.IHC002Equipe');
	},
	
	actionIndex: function(mode, record) {
		var me = this,
			window = me.createWindow();
		mode = mode || 'I';
		
		if(mode === 'I') {
			record = Ext.create('IHC.model.Equipe');
		}
		
		me.openWindow({ 
			window: window, 
			mode: mode, 
			record: record 
		});
	}
});
